<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>线性渐变</title>
		<style type="text/css">
			.box1 {
				width: 300px;
				height: 300px;
				/* 线性渐变 */
				background-image: linear-gradient(to right,blue,red);
			}
			.box2 {
				width: 300px;
				height: 300px;
				background-image: linear-gradient(to right,blue,yellow 50%,red);
			}
			.box3 {
				width: 300px;
				height: 300px;
				background-image: linear-gradient(45deg,blue,orange,red);
			}
		</style>
	</head>
	<body>
		<div class="box1"></div>
		<hr >
		<div class="box2"></div>
		<hr >
		
		
		<div class="box3"></div>
	</body>
</html>
